﻿@model ContentResourceCommentDto
@{
    var x = @Html.EasyUi();
}
@using (x.Layout(true).Begin())
{
    using (x.LayoutRegion().Top().Height(65).Begin())
    {
        <div class="titlebar">
            <span class="title">当前内容资源标题：</span>
            <span>@Model.ContentResourceTitle</span>
        </div>
        <div class="toolbar">
            <div class="toolbar">
                @*@x.Button( "添加内容资源评论" ).Icon( "icon-add4" ).Plain().ToolTip( R.RememberSave ).AddRootByTreeGrid()
                @x.Button( "添加下级内容资源评论" ).Icon( "icon-add" ).Plain().ToolTip( R.RememberSave ).AddToChildByTreeGrid()
                @x.Button( "编辑内容资源评论" ).Icon( "icon-edit" ).Plain().ToolTip( R.RememberSave ).EditByTreeGrid()
                @x.Button( "取消编辑" ).Icon( "icon-cancel2" ).Plain().CancelByTreeGrid()
                @x.Button( "删除内容资源评论" ).Icon( "icon-delete3" ).Plain().ToolTip( R.RememberSave ).DeleteByTreeGrid()
                @x.Button( "上 移" ).Icon( "icon-up" ).Plain().ToolTip( R.RememberSave ).MoveUpByTreeGrid()
                @x.Button( "下 移" ).Icon( "icon-down" ).Plain().ToolTip( R.RememberSave ).MoveDownByTreeGrid()
                @x.Button( "保 存" ).Icon( "icon-save" ).Plain().SaveByTreeGrid( "/commons/contentResourceComment/save" )
                @x.Button( "冻 结" ).Icon( "icon-delete4" ).Plain().SubmitIdsByTreeGrid( "/commons/contentResourceComment/disable" )
                @x.Button( "启 用" ).Icon( "icon-ok2" ).Plain().SubmitIdsByTreeGrid( "/commons/contentResourceComment/enable" )*@
                @x.Button( "刷 新" ).Icon( "icon-refresh" ).Plain().RefreshByTreeGrid("formQuery_comment", "grid_comment")
            </div>
        </div>
    }
    using (x.LayoutRegion().Center().Begin())
    {
        @Html.Partial( "Parts/QueryForm" ,new ContentResourceCommentQuery{ContentResourceId = Model.ContentResourceId})
        @(x.TreeGrid("grid_comment", "UserName").Toolbar("divQuery_comment").Url($"/contentResources/Comment/query?ContentResourceId={Model.ContentResourceId}")
           .Menu().Fit().FitColumns()
           .Columns(
               x.GridColumn(t => t.Id).CheckBox(),
               x.GridColumn(t => t.UserName, 70),
               x.GridColumn(t => t.Content, 100),
               x.GridColumn(t => t.CreationTime, 70)
           )
        )
    }
 }